package com.regent.central.bill.common;

/**
 * 物料采购的到料状态
 *
 * @author 钟宝林
 * @date 2018-06-20 19:20
 **/
public enum BillPurchaseArriveStatus {

    INITIAL("未到料", 0),
    PROCESSING("未到齐", 1),
    COMPLETED("已到齐", 2);

    private final String name;
    private final int value;

    BillPurchaseArriveStatus(String name, int value) {
        this.name = name;
        this.value = value;
    }

    public String getName() {
        return name;
    }

    public int getValue() {
        return value;
    }

    public static BillPurchaseArriveStatus value(int value) {
        for (BillPurchaseArriveStatus item : BillPurchaseArriveStatus.values()) {
            if (item.getValue() == value) {
                return item;
            }
        }
        throw new IllegalArgumentException("未知状态");
    }

}
